
<div class="tax-from" >
	<ol class="breadcrumb">
		您所在的位置：
    	<li><a href="#/index">首页</a></li>
    	<li class="active">税务查询</li>
	</ol>
	<div style="height:60px">
		<ul id="yzmyTab" class="nav nav-tabs">
			<!--class="active"-->
			<li ng-class="{'active':ns}" ng-click="nsClick()"><a data-toggle="tab">原国税信息查询</a></li>
			<li  ng-class="{'active':yz}" ng-click="dsClick()" ><a  data-toggle="tab" >原地税信息查询</a></li>
			
		</ul>
	</div>
<div id="yzmyTabTabContent" class="tab-content">
<div ng-if="ns" ng-controller="taxyzController">
	<div class="tab-pane fade in active" >
		<div>
			<form class="form-inline" role="form" style="width:100%;">
				
				<div class="form-group ns" style="width:26%">
					<label for="firstname" class="control-label">纳税人识别号：</label>
					<input type="text" class="form-control" ng-model="$parent.nsrsbh" maxlength="40" placeholder="纳税人识别号" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">
				</div>
				
    			<!---->
				<div class="form-group ns" style="width:26%">
					<label for="firstname" class="control-label">电子税票号：</label>
					<input type="text" class="form-control"  ng-model="$parent.taxRecepitCode" maxlength="40" placeholder="电子税票号" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">
				</div>
				<div class="form-group ns" style="width:24%">
					<label for="firstname" class="control-label">纳税人名称：</label>
					<input type="text" class="form-control" style="width:150px" ng-model="$parent.nsrname" maxlength="30" placeholder="纳税人名称" >
				</div>		
				<div class="form-group ns" style="width:24%;line-height: 30px;">
					<label for="firstname" class="control-label">税务机关：</label>
					<a href="" id="authority" ng-click="zTree()" data-toggle="modal" data-target="#zTreeModal">全部</a>
					<input type="hidden" id="taxCode"  ng-model="$parent.taxAuthorityCode" class="form-control" >
				</div>
				<div class="form-group ns" style="width:26%">
					 <label for="firstname" class="control-label">&emsp;&emsp;开始时间：&nbsp;</label>
					<div class='input-group date' style='width: 60%;'>  	
                		<input type='text' class="form-control" id="startTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" maxlength="30" placeholder="缴纳开始时间"/>  
                		<span class="input-group-addon">  
                    		<span class="glyphicon glyphicon-calendar"></span>  
                		</span>  
            		</div>  
				</div>
				<div class="form-group ns" style="width:26%">
					<label for="firstname" class="control-label">&emsp;结束时间：&nbsp;</label>
					<div class='input-group date' style='width: 60%;'>  
					<input type="text" class="form-control"  id="endTime"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" maxlength="30" placeholder="缴纳结束时间">
						<span class="input-group-addon">  
                    		<span class="glyphicon glyphicon-calendar"></span>  
                		</span>  
            		</div>  
				</div>
				<!--<div class="form-group ns" style="width:20%">
					<label for="firstname" class="control-label">缴纳状态：</label>
					<select class="form-control" style="height: 35px;">
						<option value="">全部&emsp;&emsp;</option>
						<option value="">已缴纳</option>
						<option value="">未缴纳</option>
					</select>
				</div>-->
				<div class="form-group ns" style="width:24%">
					<label for="firstname"  class="control-label">支付方式：</label>
					<select class="form-control" ng-model="$parent.payWayEn"  style="height: 35px;width:53%">
						<option value="">全部</option>
						<option value="weixin">微信</option>
						<option value="alipay">支付宝</option>
						<option value="wangyin">网银</option>
					</select>
				</div>
				<div class="form-group ns" style="width:20%">
					<label for="firstname"  class="control-label">缴税平台：</label>
					<select class="form-control" ng-model="$parent.payPlatformId"  style="height:35px;">
						<option value="">全部</option>
						<option value="1">网上办税平台</option>
						<option value="2">办税大厅</option>
						<option value="3">业务待办点</option>
						<option value="4">自助终端</option>
					</select>
				</div>
				<div class="form-group ns" style="width:24%">
					<label for="firstname"  class="control-label">&emsp;&emsp;支付状态：</label>
					<select class="form-control" ng-model="$parent.payState"  style="height:35px;width:62%;">
						<option value="">支付成功</option>
						<option value="2">支付失败</option>
					</select>
				</div>
				<div class="form-group ns" style="width:20%">
					<label for="firstname"  class="control-label">&emsp;&emsp;&nbsp;&nbsp;入库状态：</label>
					<select class="form-control" ng-model="$parent.schedule"  style="height: 35px;">
						<option value="">全部</option>
						<option value="5">已入库</option>
						<option value="4">未入库</option>
					</select>
				</div>
				<div class="row" style="text-align: center;margin-top: 15px;">
					
					<button  type="button" ng-click="nsrefresh()" class="btn btn-primary nsbtn">
       					<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
        				<i class="icon-search"></i>查询
    				</button>
    				
    			</div>
			</form>
		</div>
		<div class="tax-title">
			<span class="glyphicon glyphicon-home"></span>
			<span class="span_title" style="font-weight:400;">
				总笔数:{{shuiwuData.total}}笔&emsp;|&emsp;已入库:{{shuiwuData.recTotal}}笔&emsp;|&emsp;未入库:{{shuiwuData.unRecTotal}}笔&emsp;|&emsp;纳税总额:{{shuiwuData.taxTotal}}元
			</span>
		</div>
		<div>
			<table class="table table-hover nstable">
				<thead>
					<tr>
						<th>纳税人</th>
						<th>纳税人识别号</th>
						<th>电子税票号</th>
						<th>征收项目</th>
						<th>应缴税额</th>
						<!--<th>交易状态</th>-->
						<!--<th>是否逾期</th>-->
						<th>缴纳方式</th>
						<th>税务机关</th>
						<th>支付状态</th>
						<th>上解状态</th>
						<th>入库状态</th>
						<!--<th>所属期起</th>-->
						<th>缴纳日期</th>
						
						<th></th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="data in list">
						<td><lable title="{{data.taxPayerName}}">{{data.taxPayerName | cut:true:8:' ...'}}</lable></td>
						<td>{{data.taxPayerCode}}</td>
						<td>{{data.taxRecepitCode}}</td>
						<td>{{data.zsxmMc}}</td>
						<td class="ns_paid">{{data.paymentAmount}}元</td>
						<!--<td class="pay_green" ng-if="data.payState==1">已缴纳</td>
						<td class="pay_red" ng-if="data.payState==0">未缴纳</td>-->
						<!--<td class="pay_red" ng-if="data.taxOverdue!=0">逾期</td>
						<td ng-if="data.taxOverdue==0">未逾期</td>-->
						<td ng-if="data.payWay==1" >
  							<span ng-if="data.payWayEn=='alipay'">支付宝</span>
  							<span  ng-if="data.payWayEn=='weixin'">微信</span>
  						</td>
  						<td ng-if="data.payWay==2" >
  							<span>网银</span>
  						</td>
						<td>{{data.officeName}}</td><!--{{some_text | cut:true:100:' ...'}}-->
						<!--<td>{{data.taxStart | date:'yyyy-MM-dd'}}</td> -->
						<td>
							<span ng-if="data.payState==1" >成功</span>
							<span ng-if="data.payState!=1" >失败</span>
						</td>
						<td>
							<span ng-if="data.turnedOverStatus==1" >已上解</span>
							<span ng-if="data.turnedOverStatus==2" >上解失败</span>
							<span ng-if="data.turnedOverStatus==null||data.turnedOverStatus==''" >未上解</span>
						</td>
						<td ng-if="data.payState==1" >
							<span ng-if="data.schedule==5" >已入库</span>
							<span ng-if="data.schedule!=5" >未入库</span>
						</td><td ng-if="data.payState!=1" ></td>
						
						<td>{{data.noticeDate | date:'yyyy-MM-dd'}}</td>
						<td>
							<button type="button" ng-click="selectYzDetail(data.taxRecepitCode)" class="btn btn-primary">
       							查看
    						</button>
    						&nbsp;
						</td>
					</tr>
				</tbody>
			</table>			 
			<pagination count="count"  page="page" pagesize="pagesize" refresh="nsrefresh()"></pagination>
		</div>
	</div>
	<!-- 模态框（Modal） -->
<div class="modal fade" id="zTreeModal" tabindex="-1" role="dialog" aria-labelledby="zTreeModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content" style="">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">税务机关选择</h4>
            </div>
            <div class="modal-body" style="height:400px;overflow: scroll;">
            	<ul id="treeDemo" class="ztree"></ul>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" ng-click="zTreeclick()">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</div>
<!--地税信息列表 start-->
<div ng-if="yz" ng-controller="taxyzController">
	<div class="tab-pane fade in active" >
		<div>
			<form class="form-inline" role="form" style="width:100%;">
				
				<div class="form-group ns" style="width:26%">
					<label for="firstname" class="control-label">纳税人识别号：</label>
					<input type="text" class="form-control" ng-model="$parent.nsrsbh2" maxlength="40" placeholder="纳税人识别号" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">
				</div>
				
    			<!---->
				<div class="form-group ns" style="width:26%">
					<label for="firstname" class="control-label">电子税票号：</label>
					<input type="text" class="form-control"  ng-model="$parent.taxRecepitCode" maxlength="40" placeholder="应征税款凭证号" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')">
				</div>
				<div class="form-group ns" style="width:24%">
					<label for="firstname" class="control-label">纳税人名称：</label>
					<input type="text" class="form-control" style="width:150px" ng-model="$parent.nsrname2" maxlength="20"  placeholder="纳税人名称" >
				</div>		
				<div class="form-group ns" style="width:24%;line-height: 30px;">
					<label for="firstname" class="control-label">税务机关：</label>
					<a href="" id="authority" ng-click="zTree()" data-toggle="modal" data-target="#zTreeModal">全部</a>
					<input type="hidden" id="taxCode"  ng-model="$parent.taxAuthorityCode" class="form-control" >
				</div>
				<div class="form-group ns" style="width:26%">
					 <label for="firstname" class="control-label">&emsp;&emsp;开始时间：&nbsp;</label>
					<div class='input-group date' style='width: 60%;'>  	
                		<input type='text' class="form-control" id="startTime2" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" maxlength="30" placeholder="缴纳开始时间"/>  
                		<span class="input-group-addon">  
                    		<span class="glyphicon glyphicon-calendar"></span>  
                		</span>  
            		</div>  
				</div>
				<div class="form-group ns" style="width:26%">
					<label for="firstname" class="control-label">&emsp;结束时间：&nbsp;</label>
					<div class='input-group date' style='width: 60%;'>  
					<input type="text" class="form-control"  id="endTime2"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" maxlength="30" placeholder="缴纳结束时间">
						<span class="input-group-addon">  
                    		<span class="glyphicon glyphicon-calendar"></span>  
                		</span>  
            		</div>  
				</div>
				<!--<div class="form-group ns" style="width:20%">
					<label for="firstname" class="control-label">缴纳状态：</label>
					<select class="form-control" style="height: 35px;">
						<option value="">全部&emsp;&emsp;</option>
						<option value="">已缴纳</option>
						<option value="">未缴纳</option>
					</select>
				</div>-->
				<div class="form-group ns" style="width:24%">
					<label for="firstname"  class="control-label">支付方式：</label>
					<select class="form-control" ng-model="$parent.payWayEn2"  style="height: 35px;width:53%">
						<option value="">全部</option>
						<option value="weixin">微信</option>
						<option value="alipay">支付宝</option>
						<option value="wangyin">网银</option>
					</select>
				</div>
				<div class="form-group ns" style="width:20%">
					<label for="firstname"  class="control-label">缴税平台：</label>
					<select class="form-control" ng-model="$parent.payPlatformId2"  style="height: 35px;">
						<option value="">全部</option>
						<option value="1">网上办税平台</option>
						<option value="2">办税大厅</option>
						<option value="3">业务待办点</option>
						<option value="4">自助终端</option>
					</select>
				</div>
				<div class="form-group ns" style="width:24%">
					<label for="firstname"  class="control-label">&emsp;&emsp;支付状态：</label>
					<select class="form-control" ng-model="$parent.payState2"  style="height:35px;width:62%;">
						<option value="">支付成功</option>
						<option value="2">支付失败</option>
					</select>
				</div>
				<div class="form-group ns" style="width:20%">
					<label for="firstname"  class="control-label">&emsp;&emsp;&nbsp;&nbsp;入库状态：</label>
					<select class="form-control" ng-model="$parent.schedule2"  style="height: 35px;">
						<option value="">全部</option>
						<option value="5">已入库</option>
						<option value="4">未入库</option>
					</select>
				</div>
				<div class="row" style="text-align: center;margin-top: 15px;">
					
					<button  type="button" ng-click="dsrefresh()" class="btn btn-primary nsbtn">
       					<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
        				<i class="icon-search"></i>查询
    				</button>
    				
    			</div>
			</form>
		</div>
		<div class="tax-title">
			<span class="glyphicon glyphicon-home"></span>
			<span class="span_title" style="font-weight:400;">
				总笔数:{{dishuiData.total}}笔&emsp;|&emsp;已入库:{{dishuiData.recTotal}}笔&emsp;|&emsp;未入库:{{dishuiData.unRecTotal}}笔&emsp;|&emsp;纳税总额:{{dishuiData.taxTotal}}元
			</span>
		</div>
		<div>
			<table class="table table-hover nstable">
				<thead>
					<tr>
						<th>纳税人</th>
						<th>纳税人识别号</th>
						<th>电子税票号</th>
						<th>应缴税额</th>
						<!--<th>交易状态</th>-->
						<!--<th>是否逾期</th>-->
						<th>缴纳方式</th>
						<th>税务机关</th>
						<th>支付状态</th>
						<th>上解状态</th>
						<th>入库状态</th>
						<!--<th>所属期起</th>-->
						<th>缴纳日期</th>
						
						<th></th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="data in list2">
						<td><lable title="{{data.taxPayerName}}">{{data.taxPayerName | cut:true:8:' ...'}}</lable></td>
						<td>{{data.taxPayerCode}}</td>
						<td>{{data.taxRecepitCode}}</td>
						<td class="ns_paid">{{data.orderAmount}}元</td>
						<!--<td class="pay_green" ng-if="data.payState==1">已缴纳</td>
						<td class="pay_red" ng-if="data.payState==0">未缴纳</td>-->
						<!--<td class="pay_red" ng-if="data.taxOverdue!=0">逾期</td>
						<td ng-if="data.taxOverdue==0">未逾期</td>-->
						<td ng-if="data.payWay==1" >
  							<span ng-if="data.payWayEn=='alipay'">支付宝</span>
  							<span  ng-if="data.payWayEn=='weixin'">微信</span>
  						</td>
  						<td ng-if="data.payWay==2" >
  							<span>网银</span>
  						</td>
						<td>{{data.taxAuthorityName}}</td><!--{{some_text | cut:true:100:' ...'}}-->
						<!--<td>{{data.taxStart | date:'yyyy-MM-dd'}}</td> -->
						<td>
							<span ng-if="data.payState==1" >成功</span>
							<span ng-if="data.payState!=1" >失败</span>
						</td>
						<td>
							<span ng-if="data.turnedOverStatus==1" >已上解</span>
							<span ng-if="data.turnedOverStatus==2" >上解失败</span>
							<span ng-if="data.turnedOverStatus==null||data.turnedOverStatus==''" >未上解</span>
						</td>
						<td>
							<span ng-if="data.schedule==5&&data.payState!=2" >已入库</span>
							<span ng-if="data.schedule!=5&&data.payState!=2" >未入库</span>
							
						</td>
						<td>{{data.noticeDate | date:'yyyy-MM-dd'}}</td>
						<td>
							<button type="button" ng-click="selectDsDetail(data.reqMsgId)" class="btn btn-primary">
       							查看
    						</button>
    						&nbsp;
						</td>
					</tr>
				</tbody>
			</table>			 
			<pagination count="count2"  page="page2" pagesize="pagesize2" refresh="dsrefresh()"></pagination>
		</div>
	</div>
		<!-- 模态框（Modal） -->
<div class="modal fade" id="zTreeModal" tabindex="-1" role="dialog" aria-labelledby="zTreeModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content" style="">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">税务机关选择</h4>
            </div>
            <div class="modal-body" style="height:400px;overflow: scroll;">
            	<ul id="treeDemo" class="ztree"></ul>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" ng-click="zTreeclick()">确定</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</div>
</div>
</div>
<script>
	$(function () {
		$('#yzmyTab li:eq(0) a').tab('show');
	});
	
	$("#yzmyTab li:eq(0)").click(function(){
  		$(this).addClass("active");
  		$("#yzmyTab li:eq(1)").removeClass("active");
  		
	});
	$("#yzmyTab li:eq(1)").click(function(){
  		$(this).addClass("active");
  		$("#yzmyTab li:eq(0)").removeClass("active");
  		
	}); 
	
	function stripscript(value) {
	    var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？]") 
	    var rs = ""; 
	    for (var i = 0; i < value.length; i++) {
	        rs = rs+s.substr(i, 1).replace(pattern, ''); 
	    } 
	    return rs;
	}
</script>
